package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.Map;

@Mapper
@Component
public interface UserMapper {

    //查询用户
    @Select("select * from user where openid = #{openid}")
    User select(User u);

    //添加新用户
    void Insert(User u);

    //新用户
    Integer countByCount(Map map);

    @Select("select * from user where id = #{userId}")
    User getById(Long userId);
}
